from django.contrib import admin
from jobs.models import Job

# Register your models here.
@admin.register(Job)
class JobAdmin(admin.ModelAdmin):
    list_display = ('job_name', 'job_type','job_city','creator', 'create_date', 'modify_date')
    exclude = ('creator', 'create_date', 'modify_date' )
  #  readonly_fields = ('create_date',)
    def save_model(self, request, obj, form, change):
        obj.creator = request.user
        super().save_model(request, obj, form, change)